add_library(keyboard STATIC keyboard.cpp isocodes.cpp xkbrules.cpp xmlparser.cpp)
target_link_libraries(keyboard Fcitx5::Core Expat::Expat LibIntl::LibIntl XKBCommon::XKBCommon Fcitx5::Module::XCB Fcitx5::Module::Spell Fcitx5::Module::Notifications Fcitx5::Module::Emoji  Fcitx5::Module::QuickPhrase PkgConfig::JsonC ${FMT_TARGET})
target_include_directories(keyboard PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
fcitx5_translate_desktop_file(keyboard.conf.in keyboard.conf)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/keyboard.conf" DESTINATION "${FCITX_INSTALL_PKGDATADIR}/addon")
fcitx5_export_module(Keyboard TARGET keyboard BUILD_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}" HEADERS keyboard_public.h)
